import React from 'react';
import { Stepper } from 'antd-mobile';

const QuantitySelector = ({ quantity, setQuantity, max }) => {
  return (
    <div style={{ display: 'flex', alignItems: 'center' }}>
      <Stepper
        style={{ width: '100px' }}
        showNumber
        min={1}
        max={max}
        value={quantity}
        onChange={setQuantity}
      />
    </div>
  );
};

export default QuantitySelector;